home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d8 / qns310.arc / Q-MM1.SCR < prev    next >
Text File  |  1991-04-28  |  4KB  |  76 lines

  1. ;┌──────────────────────────────────────────────────────────────────────────┐
  2. ;│ Q-MM1.SCR          Copyright 1988-1990 by Rik Brown                      │
  3. ;│                                                                          │
  4. ;│                    Markmail 1.x door script                              │
  5. ;└──────────────────────────────────────────────────────────────────────────┘
  6.  
  7.   SEND "^~OPEN $maildoor^M"             ; Open netmail door
  8.   WHEN                                  ; Clear all WHENs
  9.   WHEN "(NS)?" "^~N^M"
  10.   WHEN "upcoming board function" LOGOFF ; Logoff if event is non-sliding
  11.   WHEN "Fatal Error"             LOGOFF ; Logoff if door problem
  12.   TIMEOUT 40               DIALSEQUENCE ; Wait max 40 secs for next line
  13.   WAITFOR "ommand?"
  14.  
  15. ULMAIL:
  16.  
  17.   WHEN
  18.   WHEN "NO CARRIER"        DIALSEQUENCE ; Error handling (carrier loss)
  19.   EXIST $maildir\SUCCESS.SND     DLMAIL ; Error handling (carrier loss)
  20.   IF "$2" = "0"                  DLMAIL ; Download mail if no mail to send
  21.   IF "$4" = "$maxulmail"         DLMAIL ; Counter check: ul attempts
  22.   INCR 4                                ; Increment ULMAIL counter
  23.   SEND "^~^M"                           ; Get "command" prompt
  24.   TIMEOUT 10                     DLMAIL ; Online test (grab command prompt)
  25.   WAITFOR "ommand?"
  26.   SEND "^~U^M"                          ; Upload current mail packet
  27.   TIMEOUT 60               DIALSEQUENCE ; Wait max 60 seconds for ready
  28.   WAITFOR "(Ctrl-X) Aborts Transfer"    ; MarkMail door is read to receive
  29.   PAUSE 1000                            ; Pause 1 sec (or overrun next cmd)
  30.   DOS "qnssz.bat $maildir $mailUL"      ; Call transfer BAT file
  31.   IF $OFFLINE              DIALSEQUENCE ; Error handling (carrier loss)
  32.   PAUSE 1000
  33.   DOS "if exist $maildir\SUCCESS.SND del $maildir\$mailUL"
  34. ; If mail upload was successful, it will be deleted. But if mail upload
  35. ; failed, it will be uploaded the next time the script is run. In this
  36. ; way no replies are lost. Pending mail files must be successfully uploaded
  37. ; before a totally new mail file can be created.
  38.   CLRSCR                                ; Exit DSZ status line
  39.   EXIST $maildir\SUCCESS.SND     DLMAIL ; Set to your location
  40.   PAUSE 6000                            ; 6 sec pause for door to recycle
  41.   GOTO ULMAIL
  42.  
  43. DLMAIL:
  44.  
  45.   WHEN
  46.   WHEN "NO CARRIER"        DIALSEQUENCE ; Error handling (carrier loss)
  47.   WHEN "No Messages Found"       LOGOFF ; Skip download if no mail is found
  48.   WHEN "[G]oodbye When Done?" "^~^~Y^M" ; Download the packet. No auto-logoff
  49.   WHEN "Error Zip'ing Packet"    DLMAIL ; Try again if error
  50.   WHEN "Pointers NOT Updated"    DLMAIL ; Try again if error
  51.   EXIST $maildir\SUCCESS.RCV     LOGOFF ; Error handling (prior carrier loss)
  52.   IF "$3" = "$maxdlmail"         LOGOFF ; Counter check: dl attempts
  53.   INCR 3                                ; Increment DLMAIL counter
  54.   SEND "^~^M"                           ; Get "command" prompt
  55.   TIMEOUT 60                     LOGOFF ; Keep large
  56.   WAITFOR "ommand?"
  57.   SEND "^~D^M"                          ; Download mail packet
  58.   TIMEOUT 2000             DIALSEQUENCE ; Wait max 20 minutes for packet
  59.   WAITFOR "(Ctrl-X) Aborts Transfer"    ; Wait for file to compress
  60.   PAUSE 1000                            ; Pause 1 sec (or overrun next cmd)
  61.   DOS "if exist $maildir\$mailDL del $maildir\$mailDL"
  62. ; Delete any prior non-completed Zmodem download of a incoming mail file
  63.   DOS "qnsrz.bat $maildir $mailDL"      ; Call transfer BAT file
  64.   IF $OFFLINE              DIALSEQUENCE ; Error handling (carrier loss)
  65.   CLRSCR                                ; Exit DSZ status line
  66.   EXIST $maildir\SUCCESS.RCV     LOGOFF ; Log off is DL successful
  67.   PAUSE 10000                           ; 10 sec pause for door to cycle
  68.   GOTO                           DLMAIL ; Try again if unsuccessful
  69.  
  70.   RETURN
  71.  
  72. DIALSEQUENCE:
  73.   SCRIPT Q-LOGON.SCR
  74. LOGOFF:
  75.   SCRIPT Q-LOGOFF.SCR
  76.